package com.uzai.common.enums;

/**
 * 消息功能
 * @Auther: jianghan
 * @Date: 2021/8/13 11:22
 * @Description:
 */
public enum MessageFuncEnum {
    UNKNOWN_MSG(0,"未知消息"),
    HEART_BEAT_REQ(1001,"客户端发送的心跳包"),
    MSG_RECEIVED_ACK(1002,"消息接收确认回复（接收或拒绝接收）"),
    ERROR(1003,"将错误单独提升为一种消息类型4.1"),
    CLIENT_AUTH_REQ(1010,"客户端向服务端获取通讯token请求-登陆请求"),
    CLIENT_AUTH_RSP(1011,"客户端向服务端获取通讯token响应-登陆响应"),
    CLOSE_CLIENT_APP(1013,"关闭客户端"),
    UPDATE_CLIENT(1014,"更新客户端"),
    PUSH_CLIENT_SETTING(1015,"推送大促和客户端设置插件数据"),
    PUSH_ANDROID_SETCONFIG(1016,"推送手机端设置"),
    UPDATE_ANDROID_APP (1017,"更新手机端app"),
    GET_MAIL_LIST_REQ(2001,"获取通讯录列表请求"),
    GET_USER_INFO_REQ(2002,"获取联系人详细信息请求"),
    SET_USER_DISTURB(2003,"设置、取消联系人免打扰"),
    SET_USER_TOP(2004,"设置、取消联系人置顶"),
    SELECT_TALKER(2005,"切换聊天对象"),
    CLEAR_USER_RED_POINT(2006,"消除用户的消息红点"),
    SET_USER_REMARK(2007,"设置用户备注"),
    DELETE_USER(2008,"删除指定联系人"),
    PASS_ADD_USER_APPLY(2009,"通过添加好友的请求"),
    SEND_CHAT_MESSAGE(2010,"发送聊天消息"),
    RE_CALL_MSG(2011,"撤回消息"),
    FORWARD_MSG(2012,"转发消息"),
    ADD_FRIEND_REQ(2013,"微信群添加好友申请"),
    SEND_WECHAT_REDPACK(2015,"发微信红包"),
    GET_GROUP_LIST_REQ(2016,"获取群列表请求"),
    GET_GROUP_MEMBER_LIST(2050,"获取指定群聊的群成员列表"),
    CREATE_GROUP(2051,"创建群聊"),
    INVITE_TO_GROUP(2052,"拉人进群、发送群名片"),
    SET_GROUP_NAME(2053,"设置群名称"),
    SET_GROUP_NICK(2054,"设置群昵称"),
    SEND_GROUP_NOTICE(2055,"发送群公告"),
    KICK_GROUP_USER(2056,"踢掉群成员"),
    QUIT_GROUP(2057,"退出群聊"),
    POST_SNSNEW_TASK(3001,"发朋友圈"),
    POST_COMMENT_TASK(3002,"评论朋友圈"),
    DELETE_SNSNEW_TASK(3003,"删除朋友圈"),
    MONITOR_SNSNEW_TASK(3004,"监听朋友圈任务"),
    POST_SNSNEW_TASK_V2(3005,"发朋友圈V2"),
    GROUP_SEND_TASK(2014,"助手群发任务"),
    CLEAR_DEVICE_CACHE_VALUE(4001,"清除设备移动端缓存"),
    TIKTOK_GET_CONVERS(5001,"获取抖音会话列表（群列表）"),

    //new-2023-05-16
    GET_GROUP_QRCODE(2058,"获取群二维码（企业微信）"),
    DISMISS_GROUP(2059,"解散群（企业微信）"),
    SET_GROUP_MANAGER (2060,"设置群管理员（企业微信）"),
    ADD_GROUPMEMBER_TO_FRIENDS (2061,"添加群成员为联系人（企业微信）"),
    SET_GROUPMEMBER_TO_BLACKLIST (2062,"设置群成员黑名单（企业微信）"),
    GET_GROUP_BLACKLIST (2063,"获取群黑名单（企业微信）"),
    SET_GROUP_INVITE_CONFIRM(2064,"开启/关闭群邀请确认（企业微信）"),
    PROHIBIT_SET_GROUPNAME (2065,"开启/关闭禁止修改群名（企业微信）"),
    GET_GROUP_WELCOMEMSG_LIST(2066,"/获取群欢迎语列表（企业微信）"),
    ADD_GROUP_WELCOMEMSG (2067,"/添加群欢迎群（企业微信）"),
    SET_GROUP_WELCOMEMSG (2068,"设置群欢迎语（企业微信）"),
    GET_ANTISPAM_RULE_LIST (2069,"获取防骚扰规则（企业微信），这个协议没有实体"),
    SET_ANTISPAM_RULE (2070,"设置防骚扰规则（企业微信）"),

    //new-20230829
    CHANGE_DEVICE_MSG_HANDER(4002,"切换设备接收消息端类型"),
    SEND_SMS(4003, "手机版发送短信"),


    ;

    private Integer value;
    private String desc;

    MessageFuncEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static MessageFuncEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (MessageFuncEnum type: MessageFuncEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
